//  This file is part of Swordbible - http://www.swordwarrior.net
//  Copyright (C) 2003-2009 Manu Mital mital.manu@gmail.com

//  This program is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation; either version 2, or (at your option)
//  any later version.

//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.

//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software Foundation,
//  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

#pragma once

// CBibleForm form view
# include "BibleSheet.h"

class CBibleForm : public CFormView
{
	DECLARE_DYNCREATE(CBibleForm)

protected:
	CBibleForm();           // protected constructor used by dynamic creation
	virtual ~CBibleForm();
	BOOL isSheet;			// initialized to false, but set to true when sheet created
	int instance;

public:
	enum { IDD = IDD_BIBLEFORM };
	CBibleSheet* m_pMyPropSheet;    // form contains the property sheet

#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	afx_msg LONG OnPrintMessage(UINT wp, LONG lp);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	virtual void OnInitialUpdate();
	BOOL CreateView(CWnd* pParent, CCreateContext* pContext, int ins);
	static CRichEditCtrl* pControl;   // pointer to a control that will be printed


protected:
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnEndPrintPreview(CDC* pDC, CPrintInfo* pInfo, POINT point, CPreviewView* pView);
};


